<?php
	/**
	 * @author PHIREAK
	 * save all view candidate's resumes by employer 
	 */
	class ViewResumeModel extends Model{
		public function __construct(){
			$this->open(Model::MYSQL);
			$this->calledClass("ViewResumeModel");
		}
		public function findAsObject($where=array()){
			return parent::findAsObject($where);
		}
		public function update($fields=array(),$where=array()){
			return parent::update($fields,$where);
		}
		public function save($fields=array()){
			return parent::save($fields);
		}
		public function getValue($fieldname,$where=array()){
			$this->open(Model::MYSQL);
			return parent::getFieldValue("ViewResumes",$fieldname,$where);
		}
		public function checkViewResume($rem_id,$emp_id){
			$this->open(Model::MYSQL);
			$result = parent::query("SELECT * FROM ViewResumes WHERE rem_id=$rem_id AND emp_id=$emp_id");
			return mysql_num_rows($result);
		}
	}
?>